CKEDITOR.editorConfig = function(config){
    config.language = 'en';
    config.uiColor  = '#ececec';
	config.skin = "kama";
	config.tabSpaces = "4";
	config.enterMode=CKEDITOR.ENTER_BR;
	config.shiftEnterMode = CKEDITOR.ENTER_P;
	config.resize_enabled = false;
	config.resize_dir = 'vertical';
	config.resize_maxHeight = 800;
	config.toolbarCanCollapse = false;
	config.extraPlugins = 'syntaxhighlight';
	config.toolbar_MyFull =
	[
		{ name: 'document',		items : [ 'Source','-','DocProps','Preview' ] },
		{ name: 'clipboard',	items : [ 'PasteText','PasteFromWord'] },
		{ name: 'insert',		items : [ 'Image','Flash','Smiley','SpecialChar','syntaxhighlight'] },
		'/',
		{ name: 'basicstyles',	items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript' ] },
		{ name: 'paragraph',	items : [ 'NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
		{ name: 'links',		items : [ 'Link','Unlink','Anchor' ] },
		'/',
		{ name: 'styles',		items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'colors',		items : [ 'TextColor','BGColor' ] },
		{ name: 'tools',		items : [ 'Maximize'] }
	];
	config.toolbar_MyBasic = 
	[
		{ name: 'document',		items : [ 'Preview' ] },
		{ name: 'basicstyles',	items : [ 'Bold','Italic', '-', 'NumberedList','BulletedList'] },
		{ name: 'links',		items : [ 'Link','Unlink' ] },
		{ name: 'insert',		items : [ 'SpecialChar', 'Smiley','syntaxhighlight'] }
	];
};

CKEDITOR.on('instanceReady', function (ev) { 
    with (ev.editor.dataProcessor.writer) { 
        setRules("p", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("h1", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("h2", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("h3", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("h4", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("h5", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("div", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("table", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("tr", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("td", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("iframe", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("li", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("ul", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
        setRules("ol", { indent: false, breakAfterOpen: false, breakBeforeClose: false }); 
    } 
});
